package com.kingyun.gpsinspection.purificationservice.facade.service.iam.adm;

import com.alibaba.fastjson.JSONObject;
import com.kingyun.gpsinspection.purificationservice.facade.model.BootstrapSearchBean;
import com.kingyun.gpsinspection.purificationservice.facade.model.iam.adm.TaskLinkIam;
import com.kingyun.gpsinspection.purificationservice.facade.model.iam.adm.VacationApply;

/**
 * created by lutinabo 2016/12/13
 */
public interface OutVacationApplyService
{

    /**
     * 查询申请列表
     * @param vacationApply
     * @return
     */
    JSONObject list(VacationApply vacationApply);

    /**
     * 删除请假申请
     * @param trainingPlanId
     * @return
     */
    int deleteByPrimaryKey(String[] trainingPlanId);

    /**
     * 新增请假申请并发起流程
     * @param record
     * @return
     */
    int insertSelective(VacationApply record);

    /**
     * 根据id查询请假申请
     * @param trainingPlanId
     * @return
     */
    VacationApply selectByPrimaryKey(String trainingPlanId);

    /**
     * 根据id更新请假申请
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(VacationApply record, TaskLinkIam taskLinkIam, String userName, String password);
    /**
     * 查询代处理
     * @param bootstrapSearchBean
     * @param task
     * @param type 0 休假1出差2用车
     * @return
     * @throws Exception
     */
    JSONObject listToDoTask(BootstrapSearchBean bootstrapSearchBean, TaskLinkIam task, int type, String username, String passwor);

}
